import { request } from '@/utils/request'

// 登录数据
export interface LoginData {
  username: string
  password: string
  remember: true
}

// 登录响应
export interface LoginRes {
  token: string
  loginUser: any
}

export function login(data: LoginData) {
  return request.post<LoginRes>('/api/auth/login', data)
}

export function forget(data: { username: string; phone: string; password: string }) {
  return request.post('/api/auth/forget', data)
}
